-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing of datetime to take UTC if timezone is not provided #119
base: master
Are you sure you want to change the base?
Conversation
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Have fixed the tests @nineinchnick |
I've thought about this, and this is a breaking change for anyone using this data type. What's worse, it's silent, meaning the behavior will just change for anyone not pinned to a specific version of this driver. Even if this change is correct, we should only do this in a If you don't mind, I'd keep this open for a while, hoping we can get more feedback from other people. In the meantime, I'd suggest using a workaround, like you can create a struct implementing |
Can we have the default timezone passed with the connection string like we have for custom http client. Something like ->
That way its both configurable and backwards compatible |
@cla-bot check |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
The cla-bot has been summoned, and re-checked this pull request! |
@silent-lad I like your last suggestion, can we get back to this? You haven't signed the CLA yet. |
https://github.com/trinodb/cla/pull/8/files |
PRs are not processed in that repository, you need to send the signed CLA via email. |
I will update the PR with changes today.
Is the procedure documented somewhere so I can follow? |
Yes, please read the |
This is causing problem for us in cases where we have set the trino sql timestamp to be UTC and our database has datetime columns without location information because we assume UTC as default.
In DBs like postgres if not given location is taken as UTC whereas this client parses date to EPOCH with
time.Local
as the location. WHich gives different result on different machine(cloud/ local laptop)